class Chapter:

    _season = None
    _id = 0
    _number = 0
    _name = ''

    def __init__(self, season, chapterId, chapterNumber, chapterName):
        self._season = season
        self._id = int(chapterId)
        self._name = chapterName
        self._number = int(chapterNumber)

    def get_name(self):
        return self._name

    def get_id(self):
        return self._id

    def get_season(self):
        return self._season

    def get_number(self):
        return self._number

    def is_last(self):
        season = self.get_season()
        serie = season.get_serie()

        if (serie.get_total_seasons() == season.get_number()):
            if (season.get_total_chapters() == self.get_number()):
                return True

        return False